% PARAM.m
%
% Loads intial and final structural parameters
%
% Date created: 15-May-08
% Last modified: 15-May-08

%% Plot options
lw = 2;               % LineWidth

%% Load Initial Model Parameters
% Initial Structure (holds up to period ta+T) 

% Monetary policy
target_inflation = 5;                     % Target rate of annual inflation (per cent);
rho_r            = 0.65;                  % Persistence of the interest rate in the Taylor-rule.
rho_pi           = 0.5;                   % Reaction to deviations of inflation from pitarget.
rho_y            = 0.1;                   % Reaction to deviation of output from steady state. 
rho_g            = 0.2;                   % Reaction to output growth
% 
% Households and firm's 
z     = 1.1;                                  % Steady state level of TFP.
beta  = 0.9925;                               % Discount factor.
sigma = 1;                                    % equals to 1 for log-utility on consumption; 
alpha = 0.25;                                 % Share of `backward-looking' in pricing.
psi   = 0.1;                                  % Captures the degree of nominal rigidities: psi = (theta - 1)/ phi. 
% Exogenous process
rho_a = 0.9;                                  % Persistence of demand shock
rho_e = 0.9;                                  % Persistence of mark-up shock
rho_z = 0.9;                                  % Persistence of technology shock
siga  = 0.020;                                % Std deviation of innovation to the demand process.
sige  = 0.001;                                % Std deviation of innovation to the mark_up process. 
sigz  = 0.007;                                % Std deviation of innovation to the technology process. 
sigr  = 0.002;                                % Std deviation of innovation to the interest rate. 

Omega = [siga  0   0    0;
          0  sige  0    0;
          0    0  sigz  0;
          0    0    0   sigr];
% Other stats
pitarget = log(1+(target_inflation/400));
pitarget = 0.0125;
rss = (1+pitarget)/beta; % Steady state nominal interest rate
rss_annual = ((1+pitarget)/beta)^4-1; % Steady state nominal interest rate in annual terms.

%% Anticipated Structural Variations

% Simulation Parameters
up_to = 16;    % Length of the simulation
ta = 4;        % Time of the announcement
T = 4;         % Implementation of the change at T + ta
               % Options for anticipated additive shock
shocknum = 4;  % Select 1 for demand; 2 for mark-up; 3 for technology; 4 for policy
t_hit = 6;     % Shock occurs in 't_hit'. Make sure t_hit is less than T. 



% Monetary policy
Dtarget_inflation = 0; % In annual percent inflation
Drho_r            = 0; 
Drho_pi           = 0.5;
Drho_y            = 0;
Drho_g            = 0;
% Households and firm's 
Dz                = 0;
Dbeta             = 0;
Dsigma            = 0;
Dalpha            = 0;
Dpsi              = 0;
% Exogenous process
Drho_a            = 0;
Drho_e            = 0;
Drho_z            = 0;
Dsiga             = 0;
Dsige             = 0;
Dsigz             = 0;
Dsigr             = 0;


%% Load Final Model Parameters
% New Structure (holds from period ta+T+1 onwards) 
target_inflation_n = target_inflation + Dtarget_inflation  ; 
rho_r_n = rho_r + Drho_r; 
rho_pi_n = rho_pi + Drho_pi; 
rho_y_n = rho_y + Drho_y;  
rho_g_n = rho_g + Drho_g; 

z_n = z + Dz; 
beta_n = beta + Dbeta; 
sigma_n = sigma + Dsigma; 
alpha_n = alpha + Dalpha; 
psi_n = psi + Dpsi; 

rho_a_n = rho_a + Drho_a; 
rho_e_n = rho_e + Drho_e; 
rho_z_n = rho_z + Drho_z; 
siga_n =  siga + Dsiga;  
sige_n =  sige + Dsige; 
sigz_n =  sigz + Dsigz; 
sigr_n =  sigr + Dsigr; 

Omega_n = [siga_n  0   0    0;
          0  sige_n  0    0;
          0    0  sigz_n  0;
          0    0    0   sigr_n];

% Other stats
pitarget_n = pitarget;
rss_n = (1+pitarget_n)/beta_n; % Steady state nominal interest rate.
rss_annual_n = ((1+pitarget_n)/beta_n)^4-1; % Steady state nominal interest rate in annual terms. 


%% Displays key stats of the simulation
disp('-----------------------------------')
disp('Length of simulation:   ')
disp(up_to)
disp('-----------------------------------')
disp('Time of announcement:   ')
disp(ta)
disp('-----------------------------------')
disp('Time of implementation: ')
disp(ta+T)
disp('-----------------------------------')
disp('Length of intervening period: ')
disp(T)
disp('-----------------------------------')
% disp('Time anticipated shock hits: ')
% disp(t_hit+ta)


if  or(ta < 1, up_to < T+ta) 
    disp('Possible Error: increase time of annoucement, ta')
    disp('Possible Error: increase time of simulation, up_to')
    return
end
